﻿<UserControl x:Class="NetManager.LocalBrowser.Views.LocalContentView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:vm="clr-namespace:NetManager.LocalBrowser.ViewModels"
             xmlns:cr="clr-namespace:NetManager.LocalBrowser.Controls"
             xmlns:cmd="clr-namespace:NetManager.Core.UI.Commands;assembly=NetManager.Core.UI"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <cr:PathNavigatorControl CurrentPath="{Binding CurrentPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <ListView Grid.Row="1" 
                  ItemsSource="{Binding Content}" SelectedItem="{Binding SelectedItem}" 
                  cmd:MouseDoubleClick.Command="{Binding SelectedItemChange}"
                  cmd:KeyDown.Command="{Binding SelectedItemChange}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name" Width="250" DisplayMemberBinding="{Binding Name}"/>
                    <GridViewColumn Header="Extension" Width="100" DisplayMemberBinding="{Binding Extension}"/>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
